<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>数据库表查询</title>
    <link rel="stylesheet" type="text/css" href="${s.base}/lib/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/index.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/theme/theme.css"/>
</head>
<body>
<div class="page-content-wrap clearfix">
    <form class="layui-form" id="tool">
        <div class="layui-tab">
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <div class="layui-form-item">
                        <label class="layui-form-label w100">数据库表名：</label>
                        <div class="layui-input-block">
                            <input type="text" name="tableName" placeholder="请输入数据库表名" value="${generatorVo.tableName}" autocomplete="off" class="layui-input"
                                   readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label w100"><span class="red">*</span>&nbsp;模块注解名称：</label>
                        <div class="layui-input-block">
                            <input type="text" name="moduleLogName" lay-verify="required" placeholder="请输入模块注解名称，例如系统模块" value="${generatorVo.moduleLogName}"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label w100"><span class="red">*</span>&nbsp;类注解名称：</label>
                        <div class="layui-input-block">
                            <input type="text" name="classLogName" lay-verify="required" placeholder="请输入类注解名称，例如用户" value="${generatorVo.classLogName}"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label w100"><span class="red">*</span>&nbsp;包名：</label>
                        <div class="layui-input-block">
                            <input type="text" name="packageName" lay-verify="required" placeholder="请输入包名，例如base" value="work"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label w100"><span class="red">*</span>&nbsp;模块名：</label>
                        <div class="layui-input-block">
                            <input type="text" name="moduleName" lay-verify="required" placeholder="请输入模块名，例如base" value="work/antiepidemic"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label w100"><span class="red">*</span>&nbsp;类名：</label>
                        <div class="layui-input-block">
                            <input type="text" name="entityName" lay-verify="required" placeholder="请输入类名；例如BaseUser" value="${generatorVo.entityName}"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label w100"><span class="red">*</span>&nbsp;作者：</label>
                        <div class="layui-input-block">
                            <input type="text" name="authorName" lay-verify="required" placeholder="请输入作者" value="rong yuan" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label w100"><span class="red">*</span>&nbsp;类别：</label>
                        <div class="layui-input-block">
                            <select name="generatorType" lay-verify="required">
                                <option value="">请选择</option>
                                <option value="1">通用代码（后端）</option>
                                <option value="2" selected>通用代码（前后端）</option>
                                <option value="3">工作流代码（前后端）</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block" style="margin-left: 0px !important;text-align: center">
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="submitBtn">提交</button>
                <button class="layui-btn layui-btn-primary" type="button" id="cancel">取消</button>
                <button class="layui-btn layui-btn-primary" type="button" id="save" style="display: none;"></button>
            </div>
        </div>
    </form>
</div>
<script src="${s.base}/lib/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="${s.base}/js/common.js" type="text/javascript" charset="utf-8"></script>
<script>
    layui.use(['form', 'jquery', 'dialog', 'baseutil'], function () {
        var $ = layui.jquery,
            form = layui.form,
            dialog = layui.dialog,
            baseutil = layui.baseutil;

        //监听提交
        form.on('submit(submitBtn)', function (data) {
            baseutil.AjaxPostMark("/gen/gen/generatorCode", data.field, function () {
                dialog.msg('代码生成成功');
                $("#save").click();
                parent.tabDelete('formFieldEdit');
            });
            return false;
        });
    });
</script>
</body>

</html>